#include<stdio.h>                  
#include<unistd.h>                                                                                       
#include<sys/types.h>                                                                                    
#include<sys/stat.h>                                                                                     
#include<fcntl.h>                                                                                       
#include<unistd.h>

int main()
{
	int fd1=open("Write.txt",O_RDONLY,0666);
	printf("这是关闭其他文件描述符之前的fd:%d\n",fd1);
	close(0);
	close(fd1);
	close(2);
	int fd2=open("Write.txt",O_RDONLY,0666);
	printf("这是关闭其他文件描述符之后的fd:%d\n",fd2);
	return 0;
}
